﻿#include "mythread.h"

MyThread::MyThread(QObject *parent) : QThread(parent)
{

}

MyThread::MyThread(MyTcpSocket*& sock)
{
    m_sock = sock;
}

void MyThread::run()
{

    connect(m_sock,&MyTcpSocket::readyRead,m_sock,&MyTcpSocket::recvMsg);
    connect(m_sock,&MyTcpSocket::disconnected,m_sock,&MyTcpSocket::handlerLogOut);

    exec();
}
